<?PHP
session_start();
include_once "ini.php";
dbconnect();
$json = array();
$query = "SELECT chat FROM users WHERE id_user = '".$_SESSION['id_user']."';";
$result = mysql_query($query);
$result = mysql_query($query);
if (!$result)
{
    echo "SQL error : ", $query;
    exit ;
}
else
{
	$tab = mysql_fetch_assoc($result);
	$chatteur = split(":",$tab['chat']);
	$json = $chatteur;
}
echo json_encode($json);
dbclose();
?>